package com.mos.entity;

import org.springframework.jdbc.core.RowMapper;

import java.io.Serializable;
import java.sql.ResultSet;
import java.sql.SQLException;

/**
 * Package Name: com.mos.entity
 * User: grq
 * Date: 2016/3/24
 * Time: 14:54
 * Description:some des here!
 */
public class User implements RowMapper, Serializable {

    private String id;

    private String name;

    private String password;

    public String getId() {
        return id;
    }

    public void setId(String id) {
        this.id = id;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public String getPassword() {
        return password;
    }

    public void setPassword(String password) {
        this.password = password;
    }

    public User mapRow(ResultSet resultSet, int i) throws SQLException {
        User user = new User();
        user.setId(resultSet.getString(id));
        user.setName(resultSet.getString(name));
        user.setPassword(resultSet.getString(password));
        return user;
    }
}
